package com.hmall.common.client;

import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.Item;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Description ItemClient
 * @Author potato
 * @Date 2024-03-29
 * 定义商品远程调用接口
 */
@FeignClient(value = "userservice") //声明调用的用户微服务名
public interface AddressClient {
    /**
     * 调用用户微服中controller的方法
     */
    @GetMapping("/address/{id}")
    Address findAddressById(@PathVariable("id") Long id);

}
